package com.service.impl;

import com.dao.impl.CollectionDaoImpl;
import com.dao.intf.CollectionDao;
import com.entity.Collection;
import com.service.intf.CollectionService;

import java.util.List;

public class CollectionServiceImpl implements CollectionService {
    CollectionDao collectionDao=new CollectionDaoImpl();

    @Override
    public void saveCollection(Integer blogId, Integer userId) {
        collectionDao.saveCollection(blogId,userId);
    }

    @Override
    public void deleteCollection(Integer blogId, Integer userId) {
        collectionDao.deleteCollection(blogId,userId);
    }

    @Override
    public boolean isCollection(Integer blogId, Integer userId) {

        return collectionDao.isCollection(blogId,userId);
    }

    @Override
    public List<Collection> queryCollectionBlogIdByUserId(Integer userId) {
        return collectionDao.queryCollectionBlogIdByUserId(userId);
    }

    @Override
    public Integer queryBlogCollectionNum(Integer blogId) {
        return collectionDao.queryBlogCollectionNum(blogId);
    }
}
